package com.example.service;

import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.example.entity.PayRecord;
import com.example.mapper.PayRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class IPayRecord extends ServiceImpl<PayRecordMapper, PayRecord> implements IService<PayRecord> {

    @Autowired
    PayRecordMapper payRecordMapper;

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void addRecord(PayRecord payRecord) {
        payRecordMapper.insert(payRecord);
    }
}
